package org.mozilla.intl.chardet;

public class nsDetector extends nsPSMDetector
  implements nsICharsetDetector
{
  nsICharsetDetectionObserver mObserver = null;

  public nsDetector()
  {
  }

  public nsDetector(int paramInt)
  {
    super(paramInt);
  }

  public void Init(nsICharsetDetectionObserver paramnsICharsetDetectionObserver)
  {
    this.mObserver = paramnsICharsetDetectionObserver;
  }

  public boolean DoIt(byte[] paramArrayOfByte, int paramInt, boolean paramBoolean)
  {
    if ((paramArrayOfByte == null) || (paramBoolean))
      return false;
    HandleData(paramArrayOfByte, paramInt);
    return this.mDone;
  }

  public void Done()
  {
    DataEnd();
  }

  public void Report(String paramString)
  {
    if (this.mObserver != null)
      this.mObserver.Notify(paramString);
  }

  public boolean isAscii(byte[] paramArrayOfByte, int paramInt)
  {
    for (int i = 0; i < paramInt; i++)
      if ((0x80 & paramArrayOfByte[i]) != 0)
        return false;
    return true;
  }
}

/* Location:           D:\soft\chardet.jar
 * Qualified Name:     org.mozilla.intl.chardet.nsDetector
 * JD-Core Version:    0.6.1
 */